package com.seo.mapper.user;

import java.util.Map;
import java.util.List;

import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {
	
	Map<String, Object> getSysUserByInviteCode(String inviteCode);

	Map<String, Object> getUserByUserName(String loginName);

	List<Map<String, Object>> getUserByRoleId(Integer roleId);
	
	Map<String, Object> getUserById(Integer id);
	
	Map<String, Object> getUserByPhone(String phone);

	Map<String, Object> getUserByInviteCode(String inviteCode);
	
	List<Map<String, Object>> getUserList(Map<String, Object> params);
	
	Integer getUserCnt(Map<String, Object> params);
	
	int addUser(Map<String, Object> params);
	
	int deleteUser(Integer id);
	
	int updateUser(Map<String, Object> params);
	
	int updateUserState(@Param("id") Integer id, @Param("state") String state);
	
	int updateUserPwd(Map<String, Object> params);
	
	List<Integer> getUserIdList(Map<String, Object> params);

	Map<String, Object> getUserProxyById(int id);

	int updateProxyUser(Map<String, Object> params);

	List<Map<String,Object>> getUserParent(Map<String, Object> user);
	
	@MapKey("id")
	Map<Integer,Map<String, Object>> getUserParentId(int id);

	Map<String, Object> getPriceToVipLevel(Map<String, Object> map);

	Map<String, Object> getUserPriceToVipLevel(Map<String, Object> ma);

	int addUserPriceLevel(Map<String, Object> pam);

	int getUserPriceToVipLevelNum(int id);

	String getConfigInfo(String code);

	int deleteUserPriceLevel(@Param("userId")String userId);
}
